<!-- 育苗计划统计组件 -->
<template>
  <statistics-chart
    :api-path="apiPath"
    :status-colors="statusColors"
    :status-fields="statusFields"
    count-chart-title="需求数量统计"
    area-chart-title="需求面积统计(亩)"
  />
</template>

<script>
import StatisticsChart from '@/components/StatisticsChart.vue'

export default {
  name: 'PlantStatistics',
  components: {
    StatisticsChart
  },
  data() {
    return {
      apiPath: '/cultivate/stats/plan',
      
      // 状态颜色配置
      statusColors: [
        { key: 'pending', name: '待分配', color: '#f0a369' },
        { key: 'allocated', name: '已分配', color: '#5faee3' },
        { key: 'processing', name: '育苗中', color: '#7bc86c' },
        { key: 'completed', name: '已完成', color: '#a27dd6' }
      ],
      
      // 状态字段映射
      statusFields: {
        pending: { count: 'pendingCount', area: 'pendingArea' },
        allocated: { count: 'allocatedCount', area: 'allocatedArea' },
        processing: { count: 'processingCount', area: 'processingArea' },
        completed: { count: 'completedCount', area: 'completedArea' }
      }
    }
  }
}
</script> 